package com.kfm.pm;

public class Break02 {

    public static void main(String[] args) {
        // 1+2+3+4+.. 当和超过100 结束并输出加了多少次
        int sum = 0;
        int i = 1;
        while (true) {
            sum += i; // sum = 101
            if (sum >= 100) {
                break;
            }
            i ++;
        }
        System.out.println(i);
    }
}
